Bird profiles from 70 weather radar stations in Europe. Weather radar data processed by vol2bird in bioRad, then vp_processing.

Data Summary


Country Source Processed by Version Sites included Time res Range Dealiased
Sweden BALTRAD Liesbeth 0.3.13/15 10 15 min 25km/40km* no
Finland BALTRAD Liesbeth 0.3.15 10 15 min 25km yes
The Netherlands BALTRAD Liesbeth 0.3.15 2 15 min 25km no
Czech Republic BALTRAD Liesbeth 0.3.15 2 15 min 25km yes
France BALTRAD Liesbeth 0.3.13 15 15 min 25km/40km* no
Germany DWD Baptiste 0.3.15 15 15 min 25km no
Poland IMGW Anna 0.3.6 7 10 min 25km Some**
Belgium KNMI? Liesbeth 0.3.16 3 5 min 25km no
Portugal IPMA? Pablo 0.3.15 3 10 min 25km no
Bulgaria ? Hidde 0.3.16 1 5 min 25km no
Catalonia ? Nadja 0.3.16 2 2 min 25km no

*40: sevar, seang, frbou, frmom
**plleg and plrze not

   

MTR


Filtering and rain
The data is filtered to only include nighttime (defined as between sunset and sunrise, calculated individually for at each site). Sep 18 and Oct 09 are excluded because they are not full nights (start/end at midnight). For each time stamp, we also indicate if it is raining or not. Rain is defined as more then 5 altitude bins with a DBZH of above 7.

flyway_all %>%
  mutate(Time = substring(datetime, 12,16)) %>%                   #Add "time" column (from "datetime")
  mutate(Country = substring(radar_id,1,2)) %>%                   #Add "country" column (from "radar_id")
  mutate(date_of_sunset = 
           as.Date(as.character(date_of_sunset),'%Y%m%d')) %>%    #Set "date_of_sunset" to date format
  filter(day_night == "night") %>%                                #Filter out daytime timestamps
  filter(date_of_sunset != "2016-09-18" &
         date_of_sunset != "2016-10-09") %>%                      #Filter out start and end dates 
  group_by(radar_id, datetime)%>%
  mutate(rain = ifelse(length(which(DBZH>7))>5, "yes", "no")     #with in timestamp, set rain to "yes"/"no"
         )->flyway_night                                             

MTR is then aggregated by summing over altitudes and averaging over night, to get the mean MTR per night. NA’s are ignored. Important to note here is that some radars have missing data within nights, and some are missing entire nights. Since we are mostly working with averages over the large data set, I don’t think this is necessarily a problem, but it’s up for discussion. 8 radars have one or two entire nights missing, while 4 have parts of a night missing. See a summary of the data coverage in the issue summary, or here for all the details of the data coverage.

So, sum MTR within each time stamp (over all heights) per site and date_of_sunset, then average the over the night for each site, each night. Also add what percentage of altitude profiles that contained rain:

flyway_night %>%
  group_by(radar_id, date_of_sunset, datetime) %>% #For each site, night and timestap:
    summarize(
    sum_MTR = sum(mtr, na.rm = TRUE),              #Sum over all heights
    rain = rain[1]) %>%                            #Keep rain yes/no in dataset
      group_by(radar_id, date_of_sunset) %>%       #For each site and night:
        summarize(
        mean_MTR = mean(sum_MTR, na.rm = TRUE),    #Mean over night
        percent_rain = (length(which(rain=="yes"))
                        /length(rain))*100         #Percentage of altitudeprofiles with rain
        )->flyway_agg_mtr

   

Quick look at flyway_agg_mtr, 1 to 100:

Mean MTR per site and night
radar_id date_of_sunset mean_MTR percent_rain
bejab 2016-09-19 85.13902 55.384615
bejab 2016-09-20 69.47089 0.000000
bejab 2016-09-21 49.89622 0.000000
bejab 2016-09-22 46.88227 14.159292
bejab 2016-09-23 49.84186 0.000000
bejab 2016-09-24 26.14476 0.000000
bejab 2016-09-25 31.67191 0.000000
bejab 2016-09-26 92.81671 0.000000
bejab 2016-09-27 128.64264 0.000000
bejab 2016-09-28 75.17468 0.000000
bejab 2016-09-29 74.10825 8.029197
bejab 2016-09-30 41.30632 23.188406
bejab 2016-10-01 32.65174 75.000000
bejab 2016-10-02 91.71400 11.510791
bejab 2016-10-03 1025.04929 0.000000
bejab 2016-10-04 1140.40112 0.000000
bejab 2016-10-05 478.64720 0.000000
bejab 2016-10-06 265.00750 0.000000
bejab 2016-10-07 255.11656 0.000000
bejab 2016-10-08 326.43206 33.566434
bewid 2016-09-21 2371.76064 0.000000
bewid 2016-09-22 680.98369 0.000000
bewid 2016-09-23 275.52608 0.000000
bewid 2016-09-24 78.39796 0.000000
bewid 2016-09-25 295.97874 0.000000
bewid 2016-09-26 1331.49167 5.185185
bewid 2016-09-27 243.91098 0.000000
bewid 2016-09-28 39.12097 0.000000
bewid 2016-09-29 64.84973 2.919708
bewid 2016-09-30 11.09008 92.753623
bewid 2016-10-01 34.54364 44.927536
bewid 2016-10-02 266.53593 8.633093
bewid 2016-10-03 7254.63828 0.000000
bewid 2016-10-04 3657.00468 0.000000
bewid 2016-10-05 1364.67679 0.000000
bewid 2016-10-06 108.90162 0.000000
bewid 2016-10-07 619.64518 1.398601
bewid 2016-10-08 1329.47220 0.000000
bezav 2016-09-19 101.50319 0.000000
bezav 2016-09-20 157.68062 0.000000
bezav 2016-09-21 103.50118 0.000000
bezav 2016-09-22 62.61783 0.000000
bezav 2016-09-23 50.65719 0.000000
bezav 2016-09-24 37.29761 0.000000
bezav 2016-09-25 35.75472 0.000000
bezav 2016-09-26 224.63421 0.000000
bezav 2016-09-27 35.99292 0.000000
bezav 2016-09-28 32.47516 0.000000
bezav 2016-09-29 53.16129 1.550388
bezav 2016-09-30 29.78694 36.231884
bezav 2016-10-01 23.42420 16.071429
bezav 2016-10-02 171.66247 7.857143
bezav 2016-10-03 1908.87124 0.000000
bezav 2016-10-04 1210.42543 0.000000
bezav 2016-10-05 343.67656 0.000000
bezav 2016-10-06 70.06894 0.000000
bezav 2016-10-07 190.29835 0.000000
bezav 2016-10-08 283.07568 0.000000
bgvar 2016-09-19 290.30139 16.197183
bgvar 2016-09-20 347.65164 26.056338
bgvar 2016-09-21 317.36329 9.090909
bgvar 2016-09-22 857.45738 4.166667
bgvar 2016-09-23 711.14236 0.000000
bgvar 2016-09-24 260.44261 0.000000
bgvar 2016-09-25 184.80145 24.137931
bgvar 2016-09-26 440.85094 23.972603
bgvar 2016-09-27 491.20719 0.000000
bgvar 2016-09-28 377.75735 0.000000
bgvar 2016-09-29 314.93761 0.000000
bgvar 2016-09-30 139.47432 0.000000
bgvar 2016-10-01 150.01555 0.000000
bgvar 2016-10-02 277.74222 0.000000
bgvar 2016-10-03 454.50341 0.000000
bgvar 2016-10-04 56.91992 62.000000
bgvar 2016-10-05 172.40663 0.000000
bgvar 2016-10-06 78.29705 0.000000
bgvar 2016-10-07 41.57537 80.263158
bgvar 2016-10-08 783.12935 0.000000
ctcdv 2016-09-19 50.30023 0.000000
ctcdv 2016-09-20 85.42252 0.000000
ctcdv 2016-09-21 130.10560 0.000000
ctcdv 2016-09-22 54.71262 0.000000
ctcdv 2016-09-23 52.13749 26.250000
ctcdv 2016-09-24 28.15540 0.000000
ctcdv 2016-09-25 10.55126 23.140496
ctcdv 2016-09-26 54.20148 0.000000
ctcdv 2016-09-27 100.29212 5.327869
ctcdv 2016-09-28 96.27593 0.000000
ctcdv 2016-09-29 19.32725 0.000000
ctcdv 2016-09-30 11.10501 0.000000
ctcdv 2016-10-01 16.55122 6.882591
ctcdv 2016-10-02 20.20902 0.000000
ctcdv 2016-10-03 176.94452 0.000000
ctcdv 2016-10-04 142.89984 0.000000
ctcdv 2016-10-05 78.40051 15.537849
ctcdv 2016-10-06 61.21737 10.714286
ctcdv 2016-10-07 126.07335 0.000000
ctcdv 2016-10-08 75.33061 0.000000
ctpda 2016-09-19 67.78757 0.000000
ctpda 2016-09-20 135.40669 0.000000

   

We also want MTR per hour (done in basically the same way as for the entire nights above):

#-Sum MTR with in time (over heights), create Hour from Time and then average over Hour-
flyway_night %>%
  group_by(radar_id, date_of_sunset, Time) %>%           # For each site, night and timestamp:
   summarize(
    sum_MTR = sum(mtr, na.rm = TRUE)) %>%                #Sum MTR over all heights
  mutate(Hour=substring(Time, 1, 2)) %>%                 #Create "hour" from "Time"
  group_by(radar_id, date_of_sunset, Hour)%>%            #For each site, night, and hour:
    summarize(
      average_MTR = mean(sum_MTR, na.rm = TRUE)          #Average MTR (per hour)
      )-> hourly_MTR

   

Quick look at hourly_MTR, 1 to 100:

Mean MTR per site and hour
radar_id date_of_sunset Hour average_MTR
bejab 2016-09-19 00 134.6938463
bejab 2016-09-19 01 89.9535232
bejab 2016-09-19 02 21.3934127
bejab 2016-09-19 03 0.0000000
bejab 2016-09-19 04 0.0000000
bejab 2016-09-19 05 0.0000000
bejab 2016-09-19 17 0.0891750
bejab 2016-09-19 18 12.1469442
bejab 2016-09-19 19 98.1047580
bejab 2016-09-19 20 124.1766360
bejab 2016-09-19 21 186.7662186
bejab 2016-09-19 22 176.1024486
bejab 2016-09-19 23 162.8425719
bejab 2016-09-20 00 47.9264822
bejab 2016-09-20 01 38.0499119
bejab 2016-09-20 02 38.3341032
bejab 2016-09-20 03 28.9646748
bejab 2016-09-20 04 10.7764200
bejab 2016-09-20 05 5.9514906
bejab 2016-09-20 17 16.5586724
bejab 2016-09-20 18 23.8283841
bejab 2016-09-20 19 156.7883394
bejab 2016-09-20 20 149.6928159
bejab 2016-09-20 21 146.9910414
bejab 2016-09-20 22 101.4411203
bejab 2016-09-20 23 72.3926074
bejab 2016-09-21 00 56.7541136
bejab 2016-09-21 01 54.0603456
bejab 2016-09-21 02 38.4730769
bejab 2016-09-21 03 16.7617126
bejab 2016-09-21 04 9.0657699
bejab 2016-09-21 05 7.1119878
bejab 2016-09-21 17 13.4562295
bejab 2016-09-21 18 12.3627290
bejab 2016-09-21 19 79.1912637
bejab 2016-09-21 20 72.1154015
bejab 2016-09-21 21 72.3589724
bejab 2016-09-21 22 85.9015877
bejab 2016-09-21 23 89.5547313
bejab 2016-09-22 00 52.2775055
bejab 2016-09-22 01 38.2469535
bejab 2016-09-22 02 39.5313797
bejab 2016-09-22 03 47.1009477
bejab 2016-09-22 04 34.4885463
bejab 2016-09-22 17 10.1196727
bejab 2016-09-22 18 20.8571081
bejab 2016-09-22 19 77.0783823
bejab 2016-09-22 20 54.2286454
bejab 2016-09-22 21 44.8206987
bejab 2016-09-22 22 48.2684418
bejab 2016-09-22 23 54.2234761
bejab 2016-09-23 00 52.7981591
bejab 2016-09-23 01 53.9565404
bejab 2016-09-23 02 30.2344071
bejab 2016-09-23 03 17.7076176
bejab 2016-09-23 04 12.0682597
bejab 2016-09-23 05 10.8917907
bejab 2016-09-23 17 0.2517249
bejab 2016-09-23 18 15.6969478
bejab 2016-09-23 19 71.5993148
bejab 2016-09-23 20 83.4951128
bejab 2016-09-23 21 105.2335325
bejab 2016-09-23 22 96.2125233
bejab 2016-09-23 23 54.6509165
bejab 2016-09-24 00 18.7449478
bejab 2016-09-24 01 14.5077804
bejab 2016-09-24 02 11.8255138
bejab 2016-09-24 03 6.0151946
bejab 2016-09-24 04 4.2599895
bejab 2016-09-24 05 4.5661667
bejab 2016-09-24 17 45.2489457
bejab 2016-09-24 18 52.1222186
bejab 2016-09-24 19 52.6198350
bejab 2016-09-24 20 41.6706159
bejab 2016-09-24 21 40.0506770
bejab 2016-09-24 22 34.3277114
bejab 2016-09-24 23 23.8929051
bejab 2016-09-25 00 23.4823846
bejab 2016-09-25 01 20.5916497
bejab 2016-09-25 02 25.2650170
bejab 2016-09-25 03 17.8844855
bejab 2016-09-25 04 16.8685138
bejab 2016-09-25 05 7.2351049
bejab 2016-09-25 17 18.2507964
bejab 2016-09-25 18 47.9368448
bejab 2016-09-25 19 64.9586211
bejab 2016-09-25 20 28.3091404
bejab 2016-09-25 21 34.3379980
bejab 2016-09-25 22 49.8179165
bejab 2016-09-25 23 42.5924683
bejab 2016-09-26 00 187.6884758
bejab 2016-09-26 01 206.5370058
bejab 2016-09-26 02 155.2916401
bejab 2016-09-26 03 97.4857844
bejab 2016-09-26 04 62.5704133
bejab 2016-09-26 05 19.3788821
bejab 2016-09-26 17 0.1073127
bejab 2016-09-26 18 16.4223928
bejab 2016-09-26 19 56.7187528
bejab 2016-09-26 20 48.7734870

     

Plot MTR

A quick look at mean MTR per night for all radar stations:

 
 
 

Plot direction against speed

As a way of checking the data, plot directions against speed in scatter plot, filtered for only dens above 5. For most countries it looks reasonable, with high speeds in the seasonally appropriate direction. The spread of speeds is probably higher than we would expect, with plenty of speeds around 0 and all the way up to 30 (for some outlines 40). But this is for every measurement, which might cause some additional variation. Note that there is someting wrong with FI, and maybe also CZ. This is probably caused by problems with the dealising.

 
 
 

To take away some of the variation, we can plot the same thing with means per night instead:  
 

     

MTR over season

To see the seasonal pattern at each site, we calculate how large percentage of the total MTR (sum of all means) each night contributes. One thing we discussed during the flyway-workshop was over how many nights the bulk of the migration passes a site. This makes a little less sense now that we have only a short time window and not the entire season, but lets calculate the cumulative percentages anyway.

So, for each site: calculate the percent of the total MTR that that night contributes, and then the cumulative percent (and number the nights in descending order):

flyway_agg_mtr %>%
group_by(radar_id) %>%                              #For each radar:
  mutate(total_sum_MTR=sum(mean_MTR))%>%              #Calculate total sum of mean MTRs per night
  mutate(percent_MTR=(mean_MTR/total_sum_MTR)*100)%>% #Divide each night by the total sum, take times 100
  arrange(radar_id, desc(percent_MTR))%>%            #Order by descending percentage
  mutate(cuml_percent=cumsum(percent_MTR))%>%        #Calculate cumulative sum of percentage
  mutate(n_cuml = row_number()                       #Number nights (1=night w the greatest contribution, ect)
         )-> Cumul_mtr

   

Quick look at Cumul_mtr, 1 to 100:

Cumulative MTR per site and night
radar_id date_of_sunset mean_MTR percent_rain total_sum_MTR percent_MTR cuml_percent n_cuml latitude longitude
bejab 2016-10-04 1140.40112 0.000000 4386.115 26.0002557 26.00026 1 51.19170 3.06420
bejab 2016-10-03 1025.04929 0.000000 4386.115 23.3703239 49.37058 2 51.19170 3.06420
bejab 2016-10-05 478.64720 0.000000 4386.115 10.9127826 60.28336 3 51.19170 3.06420
bejab 2016-10-08 326.43206 33.566434 4386.115 7.4423963 67.72576 4 51.19170 3.06420
bejab 2016-10-06 265.00750 0.000000 4386.115 6.0419643 73.76772 5 51.19170 3.06420
bejab 2016-10-07 255.11656 0.000000 4386.115 5.8164586 79.58418 6 51.19170 3.06420
bejab 2016-09-27 128.64264 0.000000 4386.115 2.9329517 82.51713 7 51.19170 3.06420
bejab 2016-09-26 92.81671 0.000000 4386.115 2.1161486 84.63328 8 51.19170 3.06420
bejab 2016-10-02 91.71400 11.510791 4386.115 2.0910077 86.72429 9 51.19170 3.06420
bejab 2016-09-19 85.13902 55.384615 4386.115 1.9411033 88.66539 10 51.19170 3.06420
bejab 2016-09-28 75.17468 0.000000 4386.115 1.7139241 90.37932 11 51.19170 3.06420
bejab 2016-09-29 74.10825 8.029197 4386.115 1.6896103 92.06893 12 51.19170 3.06420
bejab 2016-09-20 69.47089 0.000000 4386.115 1.5838821 93.65281 13 51.19170 3.06420
bejab 2016-09-21 49.89622 0.000000 4386.115 1.1375949 94.79040 14 51.19170 3.06420
bejab 2016-09-23 49.84186 0.000000 4386.115 1.1363556 95.92676 15 51.19170 3.06420
bejab 2016-09-22 46.88227 14.159292 4386.115 1.0688792 96.99564 16 51.19170 3.06420
bejab 2016-09-30 41.30632 23.188406 4386.115 0.9417518 97.93739 17 51.19170 3.06420
bejab 2016-10-01 32.65174 75.000000 4386.115 0.7444343 98.68183 18 51.19170 3.06420
bejab 2016-09-25 31.67191 0.000000 4386.115 0.7220948 99.40392 19 51.19170 3.06420
bejab 2016-09-24 26.14476 0.000000 4386.115 0.5960802 100.00000 20 51.19170 3.06420
bewid 2016-10-03 7254.63828 0.000000 20028.529 36.2215235 36.22152 1 49.91430 5.50560
bewid 2016-10-04 3657.00468 0.000000 20028.529 18.2589780 54.48050 2 49.91430 5.50560
bewid 2016-09-21 2371.76064 0.000000 20028.529 11.8419114 66.32241 3 49.91430 5.50560
bewid 2016-10-05 1364.67679 0.000000 20028.529 6.8136647 73.13608 4 49.91430 5.50560
bewid 2016-09-26 1331.49167 5.185185 20028.529 6.6479754 79.78405 5 49.91430 5.50560
bewid 2016-10-08 1329.47220 0.000000 20028.529 6.6378924 86.42195 6 49.91430 5.50560
bewid 2016-09-22 680.98369 0.000000 20028.529 3.4000685 89.82201 7 49.91430 5.50560
bewid 2016-10-07 619.64518 1.398601 20028.529 3.0938127 92.91583 8 49.91430 5.50560
bewid 2016-09-25 295.97874 0.000000 20028.529 1.4777857 94.39361 9 49.91430 5.50560
bewid 2016-09-23 275.52608 0.000000 20028.529 1.3756681 95.76928 10 49.91430 5.50560
bewid 2016-10-02 266.53593 8.633093 20028.529 1.3307814 97.10006 11 49.91430 5.50560
bewid 2016-09-27 243.91098 0.000000 20028.529 1.2178178 98.31788 12 49.91430 5.50560
bewid 2016-10-06 108.90162 0.000000 20028.529 0.5437325 98.86161 13 49.91430 5.50560
bewid 2016-09-24 78.39796 0.000000 20028.529 0.3914314 99.25304 14 49.91430 5.50560
bewid 2016-09-29 64.84973 2.919708 20028.529 0.3237868 99.57683 15 49.91430 5.50560
bewid 2016-09-28 39.12097 0.000000 20028.529 0.1953262 99.77216 16 49.91430 5.50560
bewid 2016-10-01 34.54364 44.927536 20028.529 0.1724722 99.94463 17 49.91430 5.50560
bewid 2016-09-30 11.09008 92.753623 20028.529 0.0553714 100.00000 18 49.91430 5.50560
bezav 2016-10-03 1908.87124 0.000000 5126.566 37.2348926 37.23489 1 50.90550 4.45500
bezav 2016-10-04 1210.42543 0.000000 5126.566 23.6108439 60.84574 2 50.90550 4.45500
bezav 2016-10-05 343.67656 0.000000 5126.566 6.7038361 67.54957 3 50.90550 4.45500
bezav 2016-10-08 283.07568 0.000000 5126.566 5.5217409 73.07131 4 50.90550 4.45500
bezav 2016-09-26 224.63421 0.000000 5126.566 4.3817678 77.45308 5 50.90550 4.45500
bezav 2016-10-07 190.29835 0.000000 5126.566 3.7120046 81.16509 6 50.90550 4.45500
bezav 2016-10-02 171.66247 7.857143 5126.566 3.3484885 84.51357 7 50.90550 4.45500
bezav 2016-09-20 157.68062 0.000000 5126.566 3.0757554 87.58933 8 50.90550 4.45500
bezav 2016-09-21 103.50118 0.000000 5126.566 2.0189185 89.60825 9 50.90550 4.45500
bezav 2016-09-19 101.50319 0.000000 5126.566 1.9799451 91.58819 10 50.90550 4.45500
bezav 2016-10-06 70.06894 0.000000 5126.566 1.3667813 92.95497 11 50.90550 4.45500
bezav 2016-09-22 62.61783 0.000000 5126.566 1.2214381 94.17641 12 50.90550 4.45500
bezav 2016-09-29 53.16129 1.550388 5126.566 1.0369766 95.21339 13 50.90550 4.45500
bezav 2016-09-23 50.65719 0.000000 5126.566 0.9881311 96.20152 14 50.90550 4.45500
bezav 2016-09-24 37.29761 0.000000 5126.566 0.7275360 96.92906 15 50.90550 4.45500
bezav 2016-09-27 35.99292 0.000000 5126.566 0.7020863 97.63114 16 50.90550 4.45500
bezav 2016-09-25 35.75472 0.000000 5126.566 0.6974400 98.32858 17 50.90550 4.45500
bezav 2016-09-28 32.47516 0.000000 5126.566 0.6334681 98.96205 18 50.90550 4.45500
bezav 2016-09-30 29.78694 36.231884 5126.566 0.5810312 99.54308 19 50.90550 4.45500
bezav 2016-10-01 23.42420 16.071429 5126.566 0.4569180 100.00000 20 50.90550 4.45500
bgvar 2016-09-22 857.45738 4.166667 6747.977 12.7068805 12.70688 1 43.27694 27.79750
bgvar 2016-10-08 783.12935 0.000000 6747.977 11.6053945 24.31227 2 43.27694 27.79750
bgvar 2016-09-23 711.14236 0.000000 6747.977 10.5386008 34.85088 3 43.27694 27.79750
bgvar 2016-09-27 491.20719 0.000000 6747.977 7.2793252 42.13020 4 43.27694 27.79750
bgvar 2016-10-03 454.50341 0.000000 6747.977 6.7354025 48.86560 5 43.27694 27.79750
bgvar 2016-09-26 440.85094 23.972603 6747.977 6.5330829 55.39869 6 43.27694 27.79750
bgvar 2016-09-28 377.75735 0.000000 6747.977 5.5980830 60.99677 7 43.27694 27.79750
bgvar 2016-09-20 347.65164 26.056338 6747.977 5.1519387 66.14871 8 43.27694 27.79750
bgvar 2016-09-21 317.36329 9.090909 6747.977 4.7030878 70.85180 9 43.27694 27.79750
bgvar 2016-09-29 314.93761 0.000000 6747.977 4.6671412 75.51894 10 43.27694 27.79750
bgvar 2016-09-19 290.30139 16.197183 6747.977 4.3020507 79.82099 11 43.27694 27.79750
bgvar 2016-10-02 277.74222 0.000000 6747.977 4.1159330 83.93692 12 43.27694 27.79750
bgvar 2016-09-24 260.44261 0.000000 6747.977 3.8595657 87.79649 13 43.27694 27.79750
bgvar 2016-09-25 184.80145 24.137931 6747.977 2.7386200 90.53511 14 43.27694 27.79750
bgvar 2016-10-05 172.40663 0.000000 6747.977 2.5549380 93.09004 15 43.27694 27.79750
bgvar 2016-10-01 150.01555 0.000000 6747.977 2.2231189 95.31316 16 43.27694 27.79750
bgvar 2016-09-30 139.47432 0.000000 6747.977 2.0669056 97.38007 17 43.27694 27.79750
bgvar 2016-10-06 78.29705 0.000000 6747.977 1.1603041 98.54037 18 43.27694 27.79750
bgvar 2016-10-04 56.91992 62.000000 6747.977 0.8435108 99.38388 19 43.27694 27.79750
bgvar 2016-10-07 41.57537 80.263158 6747.977 0.6161161 100.00000 20 43.27694 27.79750
ctcdv 2016-10-03 176.94452 0.000000 1390.213 12.7278676 12.72787 1 41.60192 1.40283
ctcdv 2016-10-04 142.89984 0.000000 1390.213 10.2789866 23.00685 2 41.60192 1.40283
ctcdv 2016-09-21 130.10560 0.000000 1390.213 9.3586783 32.36553 3 41.60192 1.40283
ctcdv 2016-10-07 126.07335 0.000000 1390.213 9.0686334 41.43417 4 41.60192 1.40283
ctcdv 2016-09-27 100.29212 5.327869 1390.213 7.2141533 48.64832 5 41.60192 1.40283
ctcdv 2016-09-28 96.27593 0.000000 1390.213 6.9252631 55.57358 6 41.60192 1.40283
ctcdv 2016-09-20 85.42252 0.000000 1390.213 6.1445622 61.71814 7 41.60192 1.40283
ctcdv 2016-10-05 78.40051 15.537849 1390.213 5.6394590 67.35760 8 41.60192 1.40283
ctcdv 2016-10-08 75.33061 0.000000 1390.213 5.4186367 72.77624 9 41.60192 1.40283
ctcdv 2016-10-06 61.21737 10.714286 1390.213 4.4034516 77.17969 10 41.60192 1.40283
ctcdv 2016-09-22 54.71262 0.000000 1390.213 3.9355553 81.11525 11 41.60192 1.40283
ctcdv 2016-09-26 54.20148 0.000000 1390.213 3.8987888 85.01404 12 41.60192 1.40283
ctcdv 2016-09-23 52.13749 26.250000 1390.213 3.7503230 88.76436 13 41.60192 1.40283
ctcdv 2016-09-19 50.30023 0.000000 1390.213 3.6181662 92.38253 14 41.60192 1.40283
ctcdv 2016-09-24 28.15540 0.000000 1390.213 2.0252572 94.40778 15 41.60192 1.40283
ctcdv 2016-10-02 20.20902 0.000000 1390.213 1.4536629 95.86145 16 41.60192 1.40283
ctcdv 2016-09-29 19.32725 0.000000 1390.213 1.3902363 97.25168 17 41.60192 1.40283
ctcdv 2016-10-01 16.55122 6.882591 1390.213 1.1905529 98.44223 18 41.60192 1.40283
ctcdv 2016-09-30 11.10501 0.000000 1390.213 0.7987987 99.24103 19 41.60192 1.40283
ctcdv 2016-09-25 10.55126 23.140496 1390.213 0.7589671 100.00000 20 41.60192 1.40283
ctpda 2016-09-20 135.40669 0.000000 1169.386 11.5792928 11.57929 1 41.88882 2.99717
ctpda 2016-10-04 135.15745 0.000000 1169.386 11.5579795 23.13727 2 41.88882 2.99717

   

Plot the total sum of MTR at each site to a map:    

Plot MTR percent

To see the seasonal pattern, we plot the pattern of intensity for each site over date and latitude. Size(area) of dots is relative to total MTR at that site and color opacity for each dot by procent MTR on that night. Illustrates how MTR increases with decreasing latitude, and (kind of) how the wave around oct 3 moves downwards.

     

Max MTR

To illustrate the wave clearer we calculate and plot the date of max MTR at each site. We then plot the date of max MTR against latitude. NOTE that this shows the max date within the specified timeframe, since some sites had single nights with high MTR also in beginning. We also filter away sites with a max MTR of zero, to exclude sites with 0 MTR for the given period (eg sease).

Find date of max MTR within given time frame:

#-Set timerange-
time_start<-"2016-09-28"
time_end<-"2016-10-08"

flyway_agg_mtr %>%                                  #From the MTR per site and night:
filter(date_of_sunset > time_start &
       date_of_sunset < time_end) %>%               #Filter for time period above
  group_by(radar_id) %>%                            #For each site:
    filter(mean_MTR==max(mean_MTR)) %>%             #Filter out night with max MTR
    filter(mean_MTR > 0) %>%                        #Filter out sites with MTR=0
    rename(date_of_max_MTR = `date_of_sunset`) %>%  #Name the new variables
    rename(max_MTR = `mean_MTR`
           )-> max_MTR_temp

   

Plot the date of maximum MTR between 2016-09-28 and 2016-10-08 against latitude. Color and size of dots by the MTR at that site on that date:

     

Plot max date of MTR

Plot a map of the sites with each max date of MTR (NOTE! only with in time limit set above) and the centriod, (mean coordinates for all sites that have that day as max). So, each site is only included once, and is plotted to the date when its MTR was highest within the given time limits.

   

Plot cumulative MTR

Plot cumulative percentages of all sites in plot, divided into three latitude groups; South < 50, Middle 50-60 and North > 60. Black lines show how many days it takes to build up 50% and 90% of total MTR at the site. So, for almost all sites half of the total MTR of the period passes in the 5 peak nights. There does not seem to be an obvious difference between latitudes.

   

Cumulative MTR within night.

Calculate how much each hour contributes to nightly total (percent) and the cumulative percentage during each night.

hourly_MTR %>%                            
group_by(radar_id, date_of_sunset) %>%                  #For each site and night:
  mutate(night_sum_mtr=sum(average_MTR))%>%               #Calculate nightly sum MTR
  mutate(percent_MTR=(average_MTR/night_sum_mtr)*100)%>%  #Percent of total night for each hour
  arrange(radar_id, date_of_sunset, desc(percent_MTR))%>% #Arrange in decending order
  mutate(cuml_percent=cumsum(percent_MTR))%>%             #Calculate cumulative percent
  mutate(n_cuml = row_number()                            #Number hours(1=h with the greatest contribution,so on...)
         )-> Cumul_MTR_hour 

   

Quick look at Cumul_mtr_hour, 1 to 100:

Cumulative MTR per site and hour
radar_id date_of_sunset Hour average_MTR night_sum_mtr percent_MTR cuml_percent n_cuml latitude longitude lat_group
bejab 2016-09-19 21 186.7662186 1006.2695 18.5602577 18.56026 1 51.1917 3.0642 Middle50-60
bejab 2016-09-19 22 176.1024486 1006.2695 17.5005247 36.06078 2 51.1917 3.0642 Middle50-60
bejab 2016-09-19 23 162.8425719 1006.2695 16.1827986 52.24358 3 51.1917 3.0642 Middle50-60
bejab 2016-09-19 00 134.6938463 1006.2695 13.3854640 65.62905 4 51.1917 3.0642 Middle50-60
bejab 2016-09-19 20 124.1766360 1006.2695 12.3402957 77.96934 5 51.1917 3.0642 Middle50-60
bejab 2016-09-19 19 98.1047580 1006.2695 9.7493519 87.71869 6 51.1917 3.0642 Middle50-60
bejab 2016-09-19 01 89.9535232 1006.2695 8.9393070 96.65800 7 51.1917 3.0642 Middle50-60
bejab 2016-09-19 02 21.3934127 1006.2695 2.1260122 98.78401 8 51.1917 3.0642 Middle50-60
bejab 2016-09-19 18 12.1469442 1006.2695 1.2071263 99.99114 9 51.1917 3.0642 Middle50-60
bejab 2016-09-19 17 0.0891750 1006.2695 0.0088619 100.00000 10 51.1917 3.0642 Middle50-60
bejab 2016-09-19 03 0.0000000 1006.2695 0.0000000 100.00000 11 51.1917 3.0642 Middle50-60
bejab 2016-09-19 04 0.0000000 1006.2695 0.0000000 100.00000 12 51.1917 3.0642 Middle50-60
bejab 2016-09-19 05 0.0000000 1006.2695 0.0000000 100.00000 13 51.1917 3.0642 Middle50-60
bejab 2016-09-20 19 156.7883394 837.6961 18.7166141 18.71661 1 51.1917 3.0642 Middle50-60
bejab 2016-09-20 20 149.6928159 837.6961 17.8695857 36.58620 2 51.1917 3.0642 Middle50-60
bejab 2016-09-20 21 146.9910414 837.6961 17.5470613 54.13326 3 51.1917 3.0642 Middle50-60
bejab 2016-09-20 22 101.4411203 837.6961 12.1095377 66.24280 4 51.1917 3.0642 Middle50-60
bejab 2016-09-20 23 72.3926074 837.6961 8.6418703 74.88467 5 51.1917 3.0642 Middle50-60
bejab 2016-09-20 00 47.9264822 837.6961 5.7212257 80.60589 6 51.1917 3.0642 Middle50-60
bejab 2016-09-20 02 38.3341032 837.6961 4.5761350 85.18203 7 51.1917 3.0642 Middle50-60
bejab 2016-09-20 01 38.0499119 837.6961 4.5422097 89.72424 8 51.1917 3.0642 Middle50-60
bejab 2016-09-20 03 28.9646748 837.6961 3.4576592 93.18190 9 51.1917 3.0642 Middle50-60
bejab 2016-09-20 18 23.8283841 837.6961 2.8445143 96.02641 10 51.1917 3.0642 Middle50-60
bejab 2016-09-20 17 16.5586724 837.6961 1.9766922 98.00311 11 51.1917 3.0642 Middle50-60
bejab 2016-09-20 04 10.7764200 837.6961 1.2864356 99.28954 12 51.1917 3.0642 Middle50-60
bejab 2016-09-20 05 5.9514906 837.6961 0.7104594 100.00000 13 51.1917 3.0642 Middle50-60
bejab 2016-09-21 23 89.5547313 607.1679 14.7495821 14.74958 1 51.1917 3.0642 Middle50-60
bejab 2016-09-21 22 85.9015877 607.1679 14.1479127 28.89749 2 51.1917 3.0642 Middle50-60
bejab 2016-09-21 19 79.1912637 607.1679 13.0427285 41.94022 3 51.1917 3.0642 Middle50-60
bejab 2016-09-21 21 72.3589724 607.1679 11.9174564 53.85768 4 51.1917 3.0642 Middle50-60
bejab 2016-09-21 20 72.1154015 607.1679 11.8773405 65.73502 5 51.1917 3.0642 Middle50-60
bejab 2016-09-21 00 56.7541136 607.1679 9.3473505 75.08237 6 51.1917 3.0642 Middle50-60
bejab 2016-09-21 01 54.0603456 607.1679 8.9036894 83.98606 7 51.1917 3.0642 Middle50-60
bejab 2016-09-21 02 38.4730769 607.1679 6.3364805 90.32254 8 51.1917 3.0642 Middle50-60
bejab 2016-09-21 03 16.7617126 607.1679 2.7606387 93.08318 9 51.1917 3.0642 Middle50-60
bejab 2016-09-21 17 13.4562295 607.1679 2.2162287 95.29941 10 51.1917 3.0642 Middle50-60
bejab 2016-09-21 18 12.3627290 607.1679 2.0361301 97.33554 11 51.1917 3.0642 Middle50-60
bejab 2016-09-21 04 9.0657699 607.1679 1.4931240 98.82866 12 51.1917 3.0642 Middle50-60
bejab 2016-09-21 05 7.1119878 607.1679 1.1713379 100.00000 13 51.1917 3.0642 Middle50-60
bejab 2016-09-22 19 77.0783823 521.2418 14.7874535 14.78745 1 51.1917 3.0642 Middle50-60
bejab 2016-09-22 20 54.2286454 521.2418 10.4037416 25.19120 2 51.1917 3.0642 Middle50-60
bejab 2016-09-22 23 54.2234761 521.2418 10.4027498 35.59394 3 51.1917 3.0642 Middle50-60
bejab 2016-09-22 00 52.2775055 521.2418 10.0294162 45.62336 4 51.1917 3.0642 Middle50-60
bejab 2016-09-22 22 48.2684418 521.2418 9.2602792 54.88364 5 51.1917 3.0642 Middle50-60
bejab 2016-09-22 03 47.1009477 521.2418 9.0362959 63.91994 6 51.1917 3.0642 Middle50-60
bejab 2016-09-22 21 44.8206987 521.2418 8.5988312 72.51877 7 51.1917 3.0642 Middle50-60
bejab 2016-09-22 02 39.5313797 521.2418 7.5840777 80.10285 8 51.1917 3.0642 Middle50-60
bejab 2016-09-22 01 38.2469535 521.2418 7.3376611 87.44051 9 51.1917 3.0642 Middle50-60
bejab 2016-09-22 04 34.4885463 521.2418 6.6166123 94.05712 10 51.1917 3.0642 Middle50-60
bejab 2016-09-22 18 20.8571081 521.2418 4.0014269 98.05855 11 51.1917 3.0642 Middle50-60
bejab 2016-09-22 17 10.1196727 521.2418 1.9414547 100.00000 12 51.1917 3.0642 Middle50-60
bejab 2016-09-23 21 105.2335325 604.7968 17.3998150 17.39982 1 51.1917 3.0642 Middle50-60
bejab 2016-09-23 22 96.2125233 604.7968 15.9082382 33.30805 2 51.1917 3.0642 Middle50-60
bejab 2016-09-23 20 83.4951128 604.7968 13.8054808 47.11353 3 51.1917 3.0642 Middle50-60
bejab 2016-09-23 19 71.5993148 604.7968 11.8385728 58.95211 4 51.1917 3.0642 Middle50-60
bejab 2016-09-23 23 54.6509165 604.7968 9.0362436 67.98835 5 51.1917 3.0642 Middle50-60
bejab 2016-09-23 01 53.9565404 604.7968 8.9214322 76.90978 6 51.1917 3.0642 Middle50-60
bejab 2016-09-23 00 52.7981591 604.7968 8.7298999 85.63968 7 51.1917 3.0642 Middle50-60
bejab 2016-09-23 02 30.2344071 604.7968 4.9991013 90.63878 8 51.1917 3.0642 Middle50-60
bejab 2016-09-23 03 17.7076176 604.7968 2.9278621 93.56665 9 51.1917 3.0642 Middle50-60
bejab 2016-09-23 18 15.6969478 604.7968 2.5954083 96.16205 10 51.1917 3.0642 Middle50-60
bejab 2016-09-23 04 12.0682597 604.7968 1.9954237 98.15748 11 51.1917 3.0642 Middle50-60
bejab 2016-09-23 05 10.8917907 604.7968 1.8009007 99.95838 12 51.1917 3.0642 Middle50-60
bejab 2016-09-23 17 0.2517249 604.7968 0.0416214 100.00000 13 51.1917 3.0642 Middle50-60
bejab 2016-09-24 19 52.6198350 349.8525 15.0405770 15.04058 1 51.1917 3.0642 Middle50-60
bejab 2016-09-24 18 52.1222186 349.8525 14.8983410 29.93892 2 51.1917 3.0642 Middle50-60
bejab 2016-09-24 17 45.2489457 349.8525 12.9337208 42.87264 3 51.1917 3.0642 Middle50-60
bejab 2016-09-24 20 41.6706159 349.8525 11.9109098 54.78355 4 51.1917 3.0642 Middle50-60
bejab 2016-09-24 21 40.0506770 349.8525 11.4478750 66.23142 5 51.1917 3.0642 Middle50-60
bejab 2016-09-24 22 34.3277114 349.8525 9.8120526 76.04348 6 51.1917 3.0642 Middle50-60
bejab 2016-09-24 23 23.8929051 349.8525 6.8294224 82.87290 7 51.1917 3.0642 Middle50-60
bejab 2016-09-24 00 18.7449478 349.8525 5.3579573 88.23086 8 51.1917 3.0642 Middle50-60
bejab 2016-09-24 01 14.5077804 349.8525 4.1468277 92.37768 9 51.1917 3.0642 Middle50-60
bejab 2016-09-24 02 11.8255138 349.8525 3.3801427 95.75783 10 51.1917 3.0642 Middle50-60
bejab 2016-09-24 03 6.0151946 349.8525 1.7193516 97.47718 11 51.1917 3.0642 Middle50-60
bejab 2016-09-24 05 4.5661667 349.8525 1.3051691 98.78235 12 51.1917 3.0642 Middle50-60
bejab 2016-09-24 04 4.2599895 349.8525 1.2176530 100.00000 13 51.1917 3.0642 Middle50-60
bejab 2016-09-25 19 64.9586211 397.5309 16.3405195 16.34052 1 51.1917 3.0642 Middle50-60
bejab 2016-09-25 22 49.8179165 397.5309 12.5318337 28.87235 2 51.1917 3.0642 Middle50-60
bejab 2016-09-25 18 47.9368448 397.5309 12.0586450 40.93100 3 51.1917 3.0642 Middle50-60
bejab 2016-09-25 23 42.5924683 397.5309 10.7142524 51.64525 4 51.1917 3.0642 Middle50-60
bejab 2016-09-25 21 34.3379980 397.5309 8.6378177 60.28307 5 51.1917 3.0642 Middle50-60
bejab 2016-09-25 20 28.3091404 397.5309 7.1212420 67.40431 6 51.1917 3.0642 Middle50-60
bejab 2016-09-25 02 25.2650170 397.5309 6.3554844 73.75979 7 51.1917 3.0642 Middle50-60
bejab 2016-09-25 00 23.4823846 397.5309 5.9070583 79.66685 8 51.1917 3.0642 Middle50-60
bejab 2016-09-25 01 20.5916497 397.5309 5.1798860 84.84674 9 51.1917 3.0642 Middle50-60
bejab 2016-09-25 17 18.2507964 397.5309 4.5910380 89.43778 10 51.1917 3.0642 Middle50-60
bejab 2016-09-25 03 17.8844855 397.5309 4.4988914 93.93667 11 51.1917 3.0642 Middle50-60
bejab 2016-09-25 04 16.8685138 397.5309 4.2433210 98.17999 12 51.1917 3.0642 Middle50-60
bejab 2016-09-25 05 7.2351049 397.5309 1.8200105 100.00000 13 51.1917 3.0642 Middle50-60
bejab 2016-09-26 01 206.5370058 1140.9442 18.1022883 18.10229 1 51.1917 3.0642 Middle50-60
bejab 2016-09-26 00 187.6884758 1140.9442 16.4502767 34.55257 2 51.1917 3.0642 Middle50-60
bejab 2016-09-26 02 155.2916401 1140.9442 13.6108008 48.16337 3 51.1917 3.0642 Middle50-60
bejab 2016-09-26 23 133.9569707 1140.9442 11.7408873 59.90425 4 51.1917 3.0642 Middle50-60
bejab 2016-09-26 03 97.4857844 1140.9442 8.5443079 68.44856 5 51.1917 3.0642 Middle50-60
bejab 2016-09-26 22 95.4497203 1140.9442 8.3658536 76.81441 6 51.1917 3.0642 Middle50-60
bejab 2016-09-26 04 62.5704133 1140.9442 5.4840906 82.29851 7 51.1917 3.0642 Middle50-60
bejab 2016-09-26 21 60.5633466 1140.9442 5.3081779 87.60668 8 51.1917 3.0642 Middle50-60
bejab 2016-09-26 19 56.7187528 1140.9442 4.9712119 92.57790 9 51.1917 3.0642 Middle50-60
bejab 2016-09-26 20 48.7734870 1140.9442 4.2748355 96.85273 10 51.1917 3.0642 Middle50-60

     

Plot cumulative MTR per hour for each night to PDF

(let me know if you’re interested in seeing this): Nightly_cuml_MTR.pdf

   

MTR in realtion to sunset

To see when in relation to sunset the migratory activity kicks off, calculate and plot MTR (for all altitudes) against time difference (in minutes) from sunset.

Calculate time to sunset:

#-New dataframe (also including daytime) with MTR summed over all altitudes (per timestamp) 
flyway_all %>%
   mutate(date_of_sunset = 
           as.Date(as.character(date_of_sunset),'%Y%m%d')) %>%    #Set "date_of_sunset" to date
   mutate(datetime = as.POSIXct(
           datetime, format="%Y-%m-%d %H:%M:%S"))%>%              #Set "datetime" to date  
   filter(date_of_sunset != "2016-09-18" &
         date_of_sunset != "2016-10-09")%>%                       #Filter out start and end dates    
    group_by(radar_id, datetime)%>%                               #For each site and timestamp:
       summarize(
         sum_mtr = sum(mtr, na.rm = TRUE)                         #sum MTR
           )->flyway_sunset

#-Add lat and long from radar meta file-
flyway_sunset <-merge(flyway_sunset, radar_metadata[, c("radar_id","latitude", "longitude")], by = "radar_id")

#-Calc sunset time with biorad function suntime-
sunset<- suntime(flyway_sunset$longitude,flyway_sunset$latitude,flyway_sunset$datetime,rise=FALSE)

#-Add the sunset time to data frame-
flyway_sunset <-cbind(flyway_sunset, sunset)

#-Calculate the time diffrence, in minutes, between sunset and timestamp (datetime)-
sunset_diff <-as.numeric(difftime(flyway_sunset$datetime, flyway_sunset$sunset, units = "mins"))

#-Add time diffence to data frame-
flyway_sunset <-cbind(flyway_sunset, sunset_diff)

#-Select range around sunset to include (minutes)-
flyway_sunset%>%
  filter(sunset_diff>-40, sunset_diff<120)->flyway_sunset_sel

#-Add latitude group-
flyway_sunset_sel$lat_group<-cut(flyway_sunset_sel$latitude, c(0,50,60,70), labels=c("South<50", "Middle50-60", "North>60"))

     

Take a look:

Time around sunset at each site
radar_id datetime sum_mtr latitude longitude sunset sunset_diff lat_group
bejab 2016-09-19 17:10:00 7.1874553 51.1917 3.0642 2016-09-19 17:49:02 -39.0455566 Middle50-60
bejab 2016-09-19 17:15:00 7.1637843 51.1917 3.0642 2016-09-19 17:49:02 -34.0455566 Middle50-60
bejab 2016-09-19 17:20:00 7.5273640 51.1917 3.0642 2016-09-19 17:49:02 -29.0455566 Middle50-60
bejab 2016-09-19 17:25:00 7.8837885 51.1917 3.0642 2016-09-19 17:49:02 -24.0455566 Middle50-60
bejab 2016-09-19 17:30:00 4.9837060 51.1917 3.0642 2016-09-19 17:49:02 -19.0455566 Middle50-60
bejab 2016-09-19 17:35:00 9.6494861 51.1917 3.0642 2016-09-19 17:49:02 -14.0455566 Middle50-60
bejab 2016-09-19 17:40:00 9.5076675 51.1917 3.0642 2016-09-19 17:49:02 -9.0455566 Middle50-60
bejab 2016-09-19 17:45:00 0.5126445 51.1917 3.0642 2016-09-19 17:49:02 -4.0455566 Middle50-60
bejab 2016-09-19 17:50:00 0.0891750 51.1917 3.0642 2016-09-19 17:49:02 0.9544434 Middle50-60
bejab 2016-09-19 18:00:00 0.4254417 51.1917 3.0642 2016-09-19 17:49:02 10.9544434 Middle50-60
bejab 2016-09-19 18:05:00 0.0000000 51.1917 3.0642 2016-09-19 17:49:02 15.9544434 Middle50-60
bejab 2016-09-19 18:10:00 0.2343906 51.1917 3.0642 2016-09-19 17:49:02 20.9544434 Middle50-60
bejab 2016-09-19 18:15:00 0.4960401 51.1917 3.0642 2016-09-19 17:49:02 25.9544434 Middle50-60
bejab 2016-09-19 18:20:00 0.5878986 51.1917 3.0642 2016-09-19 17:49:02 30.9544434 Middle50-60
bejab 2016-09-19 18:25:00 1.5441202 51.1917 3.0642 2016-09-19 17:49:02 35.9544434 Middle50-60
bejab 2016-09-19 18:30:00 1.0699600 51.1917 3.0642 2016-09-19 17:49:02 40.9544434 Middle50-60
bejab 2016-09-19 18:35:00 1.7999739 51.1917 3.0642 2016-09-19 17:49:02 45.9544434 Middle50-60
bejab 2016-09-19 18:40:00 9.2219277 51.1917 3.0642 2016-09-19 17:49:02 50.9544434 Middle50-60
bejab 2016-09-19 18:45:00 50.2421276 51.1917 3.0642 2016-09-19 17:49:02 55.9544434 Middle50-60
bejab 2016-09-19 18:50:00 67.9945057 51.1917 3.0642 2016-09-19 17:49:02 60.9544434 Middle50-60
bejab 2016-09-19 19:00:00 82.3582828 51.1917 3.0642 2016-09-19 17:49:02 70.9544434 Middle50-60
bejab 2016-09-19 19:05:00 99.5158877 51.1917 3.0642 2016-09-19 17:49:02 75.9544434 Middle50-60
bejab 2016-09-19 19:10:00 104.9864858 51.1917 3.0642 2016-09-19 17:49:02 80.9544434 Middle50-60
bejab 2016-09-19 19:15:00 103.7023959 51.1917 3.0642 2016-09-19 17:49:02 85.9544434 Middle50-60
bejab 2016-09-19 19:20:00 107.5241632 51.1917 3.0642 2016-09-19 17:49:02 90.9544434 Middle50-60
bejab 2016-09-19 19:25:00 106.8154437 51.1917 3.0642 2016-09-19 17:49:02 95.9544434 Middle50-60
bejab 2016-09-19 19:30:00 100.7949353 51.1917 3.0642 2016-09-19 17:49:02 100.9544434 Middle50-60
bejab 2016-09-19 19:35:00 85.4996241 51.1917 3.0642 2016-09-19 17:49:02 105.9544434 Middle50-60
bejab 2016-09-19 19:40:00 92.6349135 51.1917 3.0642 2016-09-19 17:49:02 110.9544434 Middle50-60
bejab 2016-09-19 19:45:00 97.2493911 51.1917 3.0642 2016-09-19 17:49:02 115.9544434 Middle50-60
bejab 2016-09-20 17:10:00 13.2761481 51.1917 3.0642 2016-09-20 17:46:45 -36.7572191 Middle50-60
bejab 2016-09-20 17:15:00 19.1989421 51.1917 3.0642 2016-09-20 17:46:45 -31.7572191 Middle50-60
bejab 2016-09-20 17:20:00 10.1641707 51.1917 3.0642 2016-09-20 17:46:45 -26.7572191 Middle50-60
bejab 2016-09-20 17:25:00 10.6666907 51.1917 3.0642 2016-09-20 17:46:45 -21.7572191 Middle50-60
bejab 2016-09-20 17:30:00 12.2336496 51.1917 3.0642 2016-09-20 17:46:45 -16.7572191 Middle50-60
bejab 2016-09-20 17:35:00 15.5173043 51.1917 3.0642 2016-09-20 17:46:45 -11.7572191 Middle50-60
bejab 2016-09-20 17:40:00 9.4948928 51.1917 3.0642 2016-09-20 17:46:45 -6.7572191 Middle50-60
bejab 2016-09-20 17:45:00 12.1644924 51.1917 3.0642 2016-09-20 17:46:45 -1.7572191 Middle50-60
bejab 2016-09-20 17:50:00 16.5586724 51.1917 3.0642 2016-09-20 17:46:45 3.2427809 Middle50-60
bejab 2016-09-20 18:00:00 17.5850691 51.1917 3.0642 2016-09-20 17:46:45 13.2427809 Middle50-60
bejab 2016-09-20 18:05:00 0.2374115 51.1917 3.0642 2016-09-20 17:46:45 18.2427809 Middle50-60
bejab 2016-09-20 18:10:00 1.1095932 51.1917 3.0642 2016-09-20 17:46:45 23.2427809 Middle50-60
bejab 2016-09-20 18:15:00 0.3209132 51.1917 3.0642 2016-09-20 17:46:45 28.2427809 Middle50-60
bejab 2016-09-20 18:20:00 0.2686283 51.1917 3.0642 2016-09-20 17:46:45 33.2427809 Middle50-60
bejab 2016-09-20 18:25:00 0.2054739 51.1917 3.0642 2016-09-20 17:46:45 38.2427809 Middle50-60
bejab 2016-09-20 18:30:00 0.1046943 51.1917 3.0642 2016-09-20 17:46:45 43.2427809 Middle50-60
bejab 2016-09-20 18:35:00 10.4897783 51.1917 3.0642 2016-09-20 17:46:45 48.2427809 Middle50-60
bejab 2016-09-20 18:40:00 59.7416787 51.1917 3.0642 2016-09-20 17:46:45 53.2427809 Middle50-60
bejab 2016-09-20 18:45:00 85.2951929 51.1917 3.0642 2016-09-20 17:46:45 58.2427809 Middle50-60
bejab 2016-09-20 18:50:00 86.7537918 51.1917 3.0642 2016-09-20 17:46:45 63.2427809 Middle50-60
bejab 2016-09-20 19:00:00 147.7151211 51.1917 3.0642 2016-09-20 17:46:45 73.2427809 Middle50-60
bejab 2016-09-20 19:05:00 135.9079536 51.1917 3.0642 2016-09-20 17:46:45 78.2427809 Middle50-60
bejab 2016-09-20 19:10:00 165.6650003 51.1917 3.0642 2016-09-20 17:46:45 83.2427809 Middle50-60
bejab 2016-09-20 19:15:00 153.0963030 51.1917 3.0642 2016-09-20 17:46:45 88.2427809 Middle50-60
bejab 2016-09-20 19:20:00 158.2885193 51.1917 3.0642 2016-09-20 17:46:45 93.2427809 Middle50-60
bejab 2016-09-20 19:25:00 174.7880645 51.1917 3.0642 2016-09-20 17:46:45 98.2427809 Middle50-60
bejab 2016-09-20 19:30:00 160.4748411 51.1917 3.0642 2016-09-20 17:46:45 103.2427809 Middle50-60
bejab 2016-09-20 19:35:00 159.7697505 51.1917 3.0642 2016-09-20 17:46:45 108.2427809 Middle50-60
bejab 2016-09-20 19:40:00 155.7379624 51.1917 3.0642 2016-09-20 17:46:45 113.2427809 Middle50-60
bejab 2016-09-20 19:45:00 153.4580498 51.1917 3.0642 2016-09-20 17:46:45 118.2427809 Middle50-60
bejab 2016-09-21 17:05:00 4.1467945 51.1917 3.0642 2016-09-21 17:44:28 -39.4689748 Middle50-60
bejab 2016-09-21 17:10:00 0.1866060 51.1917 3.0642 2016-09-21 17:44:28 -34.4689748 Middle50-60
bejab 2016-09-21 17:15:00 0.0000000 51.1917 3.0642 2016-09-21 17:44:28 -29.4689748 Middle50-60
bejab 2016-09-21 17:20:00 0.2789369 51.1917 3.0642 2016-09-21 17:44:28 -24.4689748 Middle50-60
bejab 2016-09-21 17:25:00 7.4510231 51.1917 3.0642 2016-09-21 17:44:28 -19.4689748 Middle50-60
bejab 2016-09-21 17:30:00 0.8475255 51.1917 3.0642 2016-09-21 17:44:28 -14.4689748 Middle50-60
bejab 2016-09-21 17:35:00 8.0671440 51.1917 3.0642 2016-09-21 17:44:28 -9.4689748 Middle50-60
bejab 2016-09-21 17:40:00 10.5474771 51.1917 3.0642 2016-09-21 17:44:28 -4.4689748 Middle50-60
bejab 2016-09-21 17:45:00 14.9263930 51.1917 3.0642 2016-09-21 17:44:28 0.5310252 Middle50-60
bejab 2016-09-21 17:50:00 11.9860660 51.1917 3.0642 2016-09-21 17:44:28 5.5310252 Middle50-60
bejab 2016-09-21 18:00:00 1.7818353 51.1917 3.0642 2016-09-21 17:44:28 15.5310252 Middle50-60
bejab 2016-09-21 18:05:00 7.7921954 51.1917 3.0642 2016-09-21 17:44:28 20.5310252 Middle50-60
bejab 2016-09-21 18:10:00 3.6142479 51.1917 3.0642 2016-09-21 17:44:28 25.5310252 Middle50-60
bejab 2016-09-21 18:15:00 3.0516444 51.1917 3.0642 2016-09-21 17:44:28 30.5310252 Middle50-60
bejab 2016-09-21 18:20:00 2.0854031 51.1917 3.0642 2016-09-21 17:44:28 35.5310252 Middle50-60
bejab 2016-09-21 18:25:00 2.4222548 51.1917 3.0642 2016-09-21 17:44:28 40.5310252 Middle50-60
bejab 2016-09-21 18:30:00 1.8707462 51.1917 3.0642 2016-09-21 17:44:28 45.5310252 Middle50-60
bejab 2016-09-21 18:35:00 5.0880582 51.1917 3.0642 2016-09-21 17:44:28 50.5310252 Middle50-60
bejab 2016-09-21 18:40:00 25.1338098 51.1917 3.0642 2016-09-21 17:44:28 55.5310252 Middle50-60
bejab 2016-09-21 18:45:00 34.9864222 51.1917 3.0642 2016-09-21 17:44:28 60.5310252 Middle50-60
bejab 2016-09-21 18:50:00 48.1634012 51.1917 3.0642 2016-09-21 17:44:28 65.5310252 Middle50-60
bejab 2016-09-21 19:00:00 79.6564669 51.1917 3.0642 2016-09-21 17:44:28 75.5310252 Middle50-60
bejab 2016-09-21 19:05:00 77.0815750 51.1917 3.0642 2016-09-21 17:44:28 80.5310252 Middle50-60
bejab 2016-09-21 19:10:00 73.3065315 51.1917 3.0642 2016-09-21 17:44:28 85.5310252 Middle50-60
bejab 2016-09-21 19:15:00 74.6509092 51.1917 3.0642 2016-09-21 17:44:28 90.5310252 Middle50-60
bejab 2016-09-21 19:20:00 88.9056135 51.1917 3.0642 2016-09-21 17:44:28 95.5310252 Middle50-60
bejab 2016-09-21 19:25:00 84.7665383 51.1917 3.0642 2016-09-21 17:44:28 100.5310252 Middle50-60
bejab 2016-09-21 19:30:00 80.5976325 51.1917 3.0642 2016-09-21 17:44:28 105.5310252 Middle50-60
bejab 2016-09-21 19:35:00 80.6073214 51.1917 3.0642 2016-09-21 17:44:28 110.5310252 Middle50-60
bejab 2016-09-21 19:40:00 80.6328712 51.1917 3.0642 2016-09-21 17:44:28 115.5310252 Middle50-60
bejab 2016-09-22 17:05:00 0.0000000 51.1917 3.0642 2016-09-22 17:42:10 -37.1813170 Middle50-60
bejab 2016-09-22 17:10:00 0.0000000 51.1917 3.0642 2016-09-22 17:42:10 -32.1813170 Middle50-60
bejab 2016-09-22 17:15:00 9.8068185 51.1917 3.0642 2016-09-22 17:42:10 -27.1813170 Middle50-60
bejab 2016-09-22 17:20:00 37.5540297 51.1917 3.0642 2016-09-22 17:42:10 -22.1813170 Middle50-60
bejab 2016-09-22 17:25:00 11.5885228 51.1917 3.0642 2016-09-22 17:42:10 -17.1813170 Middle50-60
bejab 2016-09-22 17:30:00 11.2342786 51.1917 3.0642 2016-09-22 17:42:10 -12.1813170 Middle50-60
bejab 2016-09-22 17:35:00 8.9113274 51.1917 3.0642 2016-09-22 17:42:10 -7.1813170 Middle50-60
bejab 2016-09-22 17:40:00 7.1576179 51.1917 3.0642 2016-09-22 17:42:10 -2.1813170 Middle50-60
bejab 2016-09-22 17:45:00 8.2014589 51.1917 3.0642 2016-09-22 17:42:10 2.8186830 Middle50-60
bejab 2016-09-22 17:50:00 12.0378864 51.1917 3.0642 2016-09-22 17:42:10 7.8186830 Middle50-60

   

Plot MTR in relation to sunset (with in the time window set above), faceted for latitude groups: NOTE, might need to adjust the scale of the plot to be clear. Maybe log?.

     

Calculate nr of birds


Needs to be checked if correct… Calculate the total number of birds passing (from the MTR). Done separately for the different time resolutions.

flyway_night %>%
  filter(Country != "pl", 
         Country != "pt", 
         Country != "bg", 
         Country != "be",
         Country != "ct", )%>%                             #Filter out Poland, Portugal, Bulgaria, Belgium, and catalonia
  group_by(radar_id, date_of_sunset, Time) %>%             #For each site, night and timestamp:
   summarize(
    sum_MTR = sum(mtr, na.rm = TRUE)) %>%                  #Sum MTR
  mutate(bird_per_hour=sum_MTR*0.25) %>%                   #Take times 0.25 (because 15min)
  group_by(radar_id, date_of_sunset) %>%                   #For each site and night
    summarize(
      bird_nr = sum(bird_per_hour, na.rm = TRUE)           #sum birds per hour
      )-> bird_nr

                                               
flyway_night %>%
  filter(Country == "pl"| 
         Country == "pt")%>%                              #Filter for only Poland and Portugal
  group_by(radar_id, date_of_sunset, Time) %>%            #For each site, night and timestamp:
   summarize(
    sum_MTR = sum(mtr, na.rm = TRUE)) %>%                 #Sum MTR
  mutate(bird_per_hour=sum_MTR*0.17) %>%                  #Take times 0.17 (because 10min)
  group_by(radar_id, date_of_sunset) %>%                  #For each site and night
    summarize(
      bird_nr = sum(bird_per_hour, na.rm = TRUE)          #sum birds per hour
      )-> bird_nr_plpt

                                                   
flyway_night %>%
  filter(Country == "bg"| 
         Country == "be")%>%                              #Filter for only Bulgaria and Belgium
  group_by(radar_id, date_of_sunset, Time) %>%            #For each site, night and timestamp:
   summarize(
    sum_MTR = sum(mtr, na.rm = TRUE)) %>%                 #Sum MTR
  mutate(bird_per_hour=sum_MTR*0.08) %>%                  #Take times 0.08 (because 5min)
  group_by(radar_id, date_of_sunset) %>%                  #For each site and night
    summarize(
      bird_nr = sum(bird_per_hour, na.rm = TRUE)          #sum birds per hour
      )-> bird_nr_bg_be


flyway_night %>%
  filter(Country == "ct")%>%                              #Filter for only Catalonia
  group_by(radar_id, date_of_sunset, Time) %>%            #For each site, night and timestamp:
   summarize(
    sum_MTR = sum(mtr, na.rm = TRUE)) %>%                 #Sum MTR
  mutate(bird_per_hour=sum_MTR*0.03) %>%                  #Take times 0.03 (because 2min)
  group_by(radar_id, date_of_sunset) %>%                  #For each site and night
    summarize(
      bird_nr = sum(bird_per_hour, na.rm = TRUE)          #sum birds per hour
      )-> bird_nr_ct

#Add all together
bird_nr %>%
  bind_rows(bird_nr_plpt, bird_nr_bg_be, bird_nr_ct
            )->bird_nr 

#-Total nr of birds passing each site-
bird_nr %>%
  group_by(radar_id)%>%                                   #For each site:
    summarize(bird_nr=sum(bird_nr))%>%                    #Sum total nr of birds
    mutate(country=substring(radar_id,1,2)                #Add "country" from radar_id code
           )-> total_bird

#-Add lat and lon from radar meta file-
total_bird <-merge(total_bird, radar_metadata[, c("radar_id","latitude", "longitude")], by = "radar_id")

 
 
In total, approximately 6 681 195 birds passed our 70 sites during these days (assuming a radar cross section of 11 cm^2).

Plot total nr of birds passing each site on map:  
 
 

   

Plot total nr of birds at each site:

   

Mean flight directions


Aggregate directions to mean direction per night per site. Filter out points with a dens of less then 5, because not useful with mean dir if very low n. Also include only night. NOTE: now averages all heights and all times. Note also that by calculating nightly averages of direction like this we are exaggerating the variation as nights with very low densities (as long as some are over 5) weigh equally to high migration nights.

Circular mean and sd: Uses package “circular” to calculate mean, sd and rho. The mean then needs to be changed from a -180 to 180 scale back to 0 to 360. The sd is for some reason given in radians, so the deg is used to convert to sd in degrees.

flyway_night %>%                                               #Start from the flyway all
  filter(dens >5) %>%                                          #Filter out all time stamps with dens less than 5
group_by(radar_id, date_of_sunset) %>%                         #For each site and night, calculate:
  summarize(
    avg_dd = mean.circular(
      circular(dd, units = "degrees"), na.rm = TRUE),          #Mean direction
    n = length(dd),                                            #Nr of datapoints
    dd_sd = deg(sd.circular(
      circular(dd, units = "degrees"), na.rm = TRUE)),         #Mean SD
    rho_dd = rho.circular(
      circular(dd, units="degrees"), na.rm=TRUE),              #R of mean dir
    avg_ff = mean(ff, na.rm = TRUE)) %>%                       #Mean GS
 mutate(avg_dd = ifelse(avg_dd < 0, (avg_dd+360), avg_dd))%>%  #Change from -180 - 180, to: 0 - 360
 mutate(country = substring(radar_id,1,2)                      #Add country
        )->mean_dir

#-Add lat and lon, then wind, then mean MTR
mean_dir <-merge(mean_dir, radar_metadata[, c("radar_id","latitude", "longitude")], by = "radar_id")
mean_dir <-merge(mean_dir, wind, by = c("radar_id","date_of_sunset"))
mean_dir <-merge(mean_dir, flyway_agg_mtr[, c("radar_id","date_of_sunset", "mean_MTR")], by = c("radar_id", "date_of_sunset"))

   

Quick look at the mean dir:

Mean direction per site and night
radar_id date_of_sunset avg_dd n dd_sd rho_dd avg_ff country latitude longitude index wind_dir_to wind.speed mean_MTR
bejab 2016-09-19 237.83867 232 17.136539 0.9562584 4.838267 be 51.19170 3.06420 2 225.0466 2.6848 85.139024
bejab 2016-09-20 256.87920 239 21.552577 0.9316953 3.668308 be 51.19170 3.06420 3 267.8200 2.9313 69.470889
bejab 2016-09-21 254.83352 308 62.031492 0.5565103 2.560880 be 51.19170 3.06420 4 8.7387 6.3777 49.896222
bejab 2016-09-22 95.65742 147 16.989626 0.9569889 3.959678 be 51.19170 3.06420 5 82.4233 5.5836 46.882273
bejab 2016-09-23 340.52309 157 74.499044 0.4294157 4.011670 be 51.19170 3.06420 6 27.8716 4.9125 49.841864
bejab 2016-09-24 356.77497 78 6.991977 0.9925816 5.744155 be 51.19170 3.06420 7 12.4516 12.2018 26.144764
bejab 2016-09-25 93.61510 117 14.650715 0.9678365 5.463813 be 51.19170 3.06420 8 95.5528 8.0744 31.671908
bejab 2016-09-26 260.35886 393 38.134644 0.8013198 4.154912 be 51.19170 3.06420 9 23.1111 3.7033 92.816711
bejab 2016-09-27 64.54204 130 5.908276 0.9946974 7.114847 be 51.19170 3.06420 10 71.6739 9.2837 128.642637
bejab 2016-09-28 63.81661 104 9.300692 0.9869113 10.192270 be 51.19170 3.06420 11 59.4755 13.1082 75.174683
bejab 2016-09-29 91.80234 126 10.721489 0.9826444 6.324291 be 51.19170 3.06420 12 89.7185 9.2973 74.108251
bejab 2016-09-30 14.52933 225 81.783683 0.3610541 2.670004 be 51.19170 3.06420 13 34.1124 5.6285 41.306317
bejab 2016-10-01 54.26861 22 15.959114 0.9619508 5.625941 be 51.19170 3.06420 14 100.2089 7.2921 32.651743
bejab 2016-10-02 167.71176 185 23.297569 0.9206553 6.739980 be 51.19170 3.06420 15 161.9992 5.9551 91.714001
bejab 2016-10-03 232.17707 749 7.946255 0.9904289 14.490525 be 51.19170 3.06420 16 257.9015 10.0079 1025.049286
bejab 2016-10-04 258.79927 326 18.171420 0.9509513 16.010272 be 51.19170 3.06420 17 283.2939 15.3036 1140.401116
bejab 2016-10-05 245.06340 339 12.583265 0.9761721 14.751319 be 51.19170 3.06420 18 261.9066 12.3681 478.647197
bejab 2016-10-06 247.50584 270 10.765890 0.9825017 11.096067 be 51.19170 3.06420 19 263.1453 9.4841 265.007501
bejab 2016-10-07 243.73263 361 15.245673 0.9652181 8.149820 be 51.19170 3.06420 20 241.8987 6.6234 255.116564
bejab 2016-10-08 231.19334 551 11.563391 0.9798405 7.242427 be 51.19170 3.06420 21 234.2281 4.9671 326.432060
bewid 2016-09-21 227.70861 1233 18.068974 0.9514892 8.135303 be 49.91430 5.50560 26 341.1655 3.1132 2371.760645
bewid 2016-09-22 204.47601 985 13.010822 0.9745465 5.524131 be 49.91430 5.50560 27 65.7085 4.7048 680.983693
bewid 2016-09-23 199.94824 667 16.852081 0.9576676 3.481475 be 49.91430 5.50560 28 49.1252 2.5227 275.526075
bewid 2016-09-24 348.20846 146 18.285858 0.9503472 8.796689 be 49.91430 5.50560 29 22.7189 9.9862 78.397957
bewid 2016-09-25 164.58911 504 16.982207 0.9570256 7.391380 be 49.91430 5.50560 30 115.2872 5.9186 295.978741
bewid 2016-09-26 215.38049 1048 19.132160 0.9457746 6.949398 be 49.91430 5.50560 31 35.1672 1.1840 1331.491665
bewid 2016-09-27 189.06370 694 42.658532 0.7579303 3.421069 be 49.91430 5.50560 32 64.4343 7.7547 243.910985
bewid 2016-09-28 49.62734 1 0.000000 1.0000000 2.545443 be 49.91430 5.50560 33 69.8711 9.8607 39.120974
bewid 2016-09-29 111.07179 93 19.048527 0.9462347 6.661824 be 49.91430 5.50560 34 77.2173 12.4171 64.849734
bewid 2016-09-30 29.55893 42 79.473960 0.3821284 2.801342 be 49.91430 5.50560 35 37.1700 6.0402 11.090078
bewid 2016-10-01 77.55348 32 2.681319 0.9989056 10.635730 be 49.91430 5.50560 36 79.5047 12.0172 34.543643
bewid 2016-10-02 153.07588 334 9.428520 0.9865515 12.236624 be 49.91430 5.50560 37 136.8995 7.1157 266.535933
bewid 2016-10-03 225.04373 1450 9.402827 0.9866242 16.991021 be 49.91430 5.50560 38 239.0371 9.3435 7254.638284
bewid 2016-10-04 239.79297 1332 19.426088 0.9441434 13.967379 be 49.91430 5.50560 39 283.9859 12.8557 3657.004677
bewid 2016-10-05 230.06026 834 11.788528 0.9790562 13.080366 be 49.91430 5.50560 40 254.2855 11.5161 1364.676793
bewid 2016-10-06 257.27916 105 8.802455 0.9882680 12.896498 be 49.91430 5.50560 41 262.6920 9.0394 108.901618
bewid 2016-10-07 225.45666 783 11.733415 0.9792495 8.789353 be 49.91430 5.50560 42 241.4463 5.8445 619.645176
bewid 2016-10-08 220.72492 763 7.550870 0.9913536 10.643082 be 49.91430 5.50560 43 216.0022 4.5372 1329.472197
bezav 2016-09-19 230.53787 179 20.840915 0.9359864 5.930753 be 50.90550 4.45500 46 248.0609 2.5992 101.503188
bezav 2016-09-20 246.49968 208 16.678516 0.9585168 9.246014 be 50.90550 4.45500 47 274.1445 3.0758 157.680622
bezav 2016-09-21 270.98637 166 40.950706 0.7745945 5.787027 be 50.90550 4.45500 48 356.9570 5.8386 103.501184
bezav 2016-09-22 97.59338 102 56.593004 0.6139698 6.679753 be 50.90550 4.45500 49 73.7458 4.6781 62.617825
bezav 2016-09-23 258.55974 124 26.777050 0.8965449 4.719645 be 50.90550 4.45500 50 39.6559 3.2851 50.657193
bezav 2016-09-24 344.43365 45 10.411509 0.9836254 9.448950 be 50.90550 4.45500 51 11.1378 10.9241 37.297609
bezav 2016-09-25 115.41968 2 41.816437 0.7661868 7.626110 be 50.90550 4.45500 52 102.2711 7.0907 35.754717
bezav 2016-09-26 228.46210 326 11.395800 0.9804149 8.941989 be 50.90550 4.45500 53 24.5415 2.0060 224.634208
bezav 2016-09-29 67.80032 31 8.117199 0.9900147 18.024483 be 50.90550 4.45500 56 86.4486 9.6427 53.161287
bezav 2016-09-30 344.56839 79 60.391419 0.5737918 2.792418 be 50.90550 4.45500 57 33.4194 4.8668 29.786944
bezav 2016-10-01 59.77601 1 0.000000 1.0000000 10.908599 be 50.90550 4.45500 58 88.8316 8.5546 23.424203
bezav 2016-10-02 171.75234 160 18.500990 0.9492024 14.745879 be 50.90550 4.45500 59 153.2538 6.2164 171.662466
bezav 2016-10-03 227.32931 696 7.175984 0.9921876 18.196879 be 50.90550 4.45500 60 246.6762 9.2640 1908.871242
bezav 2016-10-04 241.36444 325 7.457851 0.9915644 19.591541 be 50.90550 4.45500 61 280.0947 14.3929 1210.425432
bezav 2016-10-05 228.62355 202 9.117989 0.9874172 19.029156 be 50.90550 4.45500 62 256.0070 11.4778 343.676563
bezav 2016-10-06 223.60655 86 10.530944 0.9832507 12.649973 be 50.90550 4.45500 63 260.8913 9.0281 70.068940
bezav 2016-10-07 229.92090 208 9.070166 0.9875481 12.679566 be 50.90550 4.45500 64 240.4960 6.3306 190.298353
bezav 2016-10-08 223.43824 299 6.400964 0.9937790 12.772825 be 50.90550 4.45500 65 231.0196 4.5301 283.075678
bgvar 2016-09-19 79.91751 550 37.550679 0.8067323 7.879590 bg 43.27694 27.79750 68 63.2977 5.3904 290.301391
bgvar 2016-09-20 186.56640 491 14.132990 0.9700357 8.867101 bg 43.27694 27.79750 69 176.3777 7.4880 347.651638
bgvar 2016-09-21 146.27627 765 30.550604 0.8674862 6.752325 bg 43.27694 27.79750 70 151.6641 4.0340 317.363287
bgvar 2016-09-22 154.18897 925 9.829450 0.9853920 10.483469 bg 43.27694 27.79750 71 160.2234 7.9331 857.457377
bgvar 2016-09-23 164.55559 894 8.485949 0.9890920 10.810841 bg 43.27694 27.79750 72 156.5309 2.5067 711.142363
bgvar 2016-09-24 176.39335 686 58.750880 0.5911303 5.624746 bg 43.27694 27.79750 73 171.0250 2.3907 260.442607
bgvar 2016-09-25 204.75006 519 27.329989 0.8924688 6.010558 bg 43.27694 27.79750 74 243.6880 6.5292 184.801448
bgvar 2016-09-26 205.14935 802 24.519145 0.9125009 8.343486 bg 43.27694 27.79750 75 239.2367 4.8639 440.850936
bgvar 2016-09-27 174.21314 864 11.451435 0.9802251 8.432454 bg 43.27694 27.79750 76 167.8201 5.2708 491.207189
bgvar 2016-09-28 130.71927 762 16.114227 0.9612221 6.133133 bg 43.27694 27.79750 77 107.2343 5.0023 377.757353
bgvar 2016-09-29 158.19053 763 25.096133 0.9085308 6.897309 bg 43.27694 27.79750 78 171.7575 5.2570 314.937614
bgvar 2016-09-30 344.91125 498 44.434040 0.7402881 4.402306 bg 43.27694 27.79750 79 345.7172 4.2410 139.474316
bgvar 2016-10-01 174.56548 616 84.495779 0.3370872 5.101490 bg 43.27694 27.79750 80 70.2830 2.1711 150.015555
bgvar 2016-10-02 189.51616 795 148.551348 0.0346980 5.544111 bg 43.27694 27.79750 81 15.1775 4.5769 277.742215
bgvar 2016-10-03 135.43227 788 7.796389 0.9907848 7.552862 bg 43.27694 27.79750 82 97.1934 4.0028 454.503413
bgvar 2016-10-04 115.22533 151 37.427717 0.8078659 6.900251 bg 43.27694 27.79750 83 106.3692 6.5256 56.919915
bgvar 2016-10-05 119.65315 336 44.448636 0.7401418 6.392374 bg 43.27694 27.79750 84 18.3218 0.5821 172.406629
bgvar 2016-10-06 269.05749 410 54.627835 0.6347528 2.246930 bg 43.27694 27.79750 85 41.7714 2.3945 78.297053
bgvar 2016-10-07 330.84571 102 42.949853 0.7550568 5.136493 bg 43.27694 27.79750 86 358.7805 4.8110 41.575375
bgvar 2016-10-08 164.48223 912 37.180201 0.8101413 7.415488 bg 43.27694 27.79750 87 122.0190 6.7857 783.129351
ctcdv 2016-09-19 225.81792 171 15.741366 0.9629626 7.354205 ct 41.60192 1.40283 90 157.1206 3.7762 50.300229
ctcdv 2016-09-20 249.90305 285 25.306607 0.9070641 8.053629 ct 41.60192 1.40283 91 128.4062 4.9797 85.422525
ctcdv 2016-09-21 203.60017 386 27.465975 0.8914565 8.585782 ct 41.60192 1.40283 92 140.1784 3.2601 130.105595
ctcdv 2016-09-22 248.41284 254 35.136696 0.8285829 6.575098 ct 41.60192 1.40283 93 28.5372 1.4114 54.712616
ctcdv 2016-09-23 233.82611 286 64.181561 0.5339777 5.026455 ct 41.60192 1.40283 94 291.0176 1.3314 52.137492
ctcdv 2016-09-24 266.69419 111 44.120858 0.7434217 6.141204 ct 41.60192 1.40283 95 8.9263 3.5241 28.155396
ctcdv 2016-09-25 242.81950 98 75.448650 0.4202031 3.305072 ct 41.60192 1.40283 96 162.4338 2.3981 10.551261
ctcdv 2016-09-26 199.89681 201 20.141302 0.9400827 6.478780 ct 41.60192 1.40283 97 162.9579 3.5626 54.201482
ctcdv 2016-09-27 229.83114 399 47.001660 0.7142847 7.528194 ct 41.60192 1.40283 98 222.1203 6.3500 100.292123
ctcdv 2016-09-28 211.40794 431 20.720518 0.9367000 6.822220 ct 41.60192 1.40283 99 249.5237 1.8675 96.275932
ctcdv 2016-09-29 123.56584 182 114.888169 0.1339395 2.533676 ct 41.60192 1.40283 100 35.2140 3.5561 19.327251
ctcdv 2016-09-30 281.59635 68 64.273261 0.5330206 2.951832 ct 41.60192 1.40283 101 41.5120 3.8675 11.105006
ctcdv 2016-10-01 58.16377 83 24.248483 0.9143372 4.827528 ct 41.60192 1.40283 102 91.3354 3.5157 16.551225
ctcdv 2016-10-02 288.64671 122 65.180255 0.5235733 2.290329 ct 41.60192 1.40283 103 65.5916 0.9144 20.209016
ctcdv 2016-10-03 193.35739 841 35.934881 0.8214546 5.780609 ct 41.60192 1.40283 104 82.3490 2.5949 176.944515
ctcdv 2016-10-04 234.80288 672 45.588661 0.7286607 6.154008 ct 41.60192 1.40283 105 198.0870 2.2743 142.899845
ctcdv 2016-10-05 188.53995 422 41.905028 0.7653218 5.848155 ct 41.60192 1.40283 106 124.9322 5.4432 78.400512
ctcdv 2016-10-06 88.96194 204 60.093176 0.5769408 4.853551 ct 41.60192 1.40283 107 109.1070 4.8240 61.217372
ctcdv 2016-10-07 160.02349 377 15.304075 0.9649558 8.491793 ct 41.60192 1.40283 108 113.0683 7.4302 126.073352
ctcdv 2016-10-08 155.32398 360 35.828324 0.8224119 6.733815 ct 41.60192 1.40283 109 169.6555 3.0838 75.330612
ctpda 2016-09-19 210.37811 273 20.398254 0.9385924 6.949115 ct 41.88882 2.99717 112 165.8521 4.9333 67.787572
ctpda 2016-09-20 199.52288 441 8.126046 0.9899931 10.588659 ct 41.88882 2.99717 113 140.0032 5.3067 135.406686
ctpda 2016-09-21 183.39599 151 24.044490 0.9157102 7.078381 ct 41.88882 2.99717 114 165.6452 3.1302 40.579692
ctpda 2016-09-22 151.01691 18 23.126656 0.9217685 3.751680 ct 41.88882 2.99717 115 342.4081 1.6897 8.090695

   

Plot mean directions per site over date:

 
 

Plot mean directions per site:

   

Total mean direction per site

Aggregate directions overall mean per site. Still filtering out points with a dens of less then 5 and only night. NOTE: now averages all heights and all times.

Uses same circular mean, sd and rho as above.

##Calculate overall mean direction per site
flyway_night %>%                                            #Start from the flyway all nights
  filter(dens >5) %>%                                       #Filter out all time stamps with dens less than 5
group_by(radar_id) %>%                                      #For each site, calculate:
  summarize(
    total_avg_dd = mean.circular(                           
      circular(dd, units = "degrees"), na.rm = TRUE),       #Mean direction
    total_dd_sd = deg(sd.circular(
      circular(dd, units = "degrees"), na.rm = TRUE)),      #SD of mean dir 
    rho_dd = rho.circular(
      circular(dd, units="degrees"), na.rm=TRUE),           #R of mean dir
    total_avg_ff = mean(ff, na.rm = TRUE)) %>%              #Mean groundspeed
 mutate(country = substring(radar_id,1,2)                   #Add country
        )->mean_dir_total

#-Add lat and long-
mean_dir_total <-merge(mean_dir_total, radar_metadata[, c("radar_id","latitude", "longitude")], by = "radar_id")


##Total mean wind direction per site
wind %>%                                                     #Start with all wind data
  group_by(radar_id)%>%                                      #For each site calculate:
  summarize(
    total_avg_wspeed = mean(wind.speed),                     #Mean windspeed
    total_avg_wdir = mean.circular(
      circular(wind_dir_to, units = "degrees")),             #Mean wind dir
    total_wdir_sd = deg(sd.circular(
      circular(wind_dir_to, units = "degrees")))             #Mean sd
    )->total_mean_wind 

#-Add wind to mean_dir_total-
mean_dir_total <-merge(mean_dir_total, total_mean_wind[, c("radar_id","total_avg_wspeed", "total_avg_wdir", "total_wdir_sd")], by = "radar_id")


##Total mean MTR per site
flyway_agg_mtr %>%                 #From the MTR per site and night
  group_by(radar_id)%>%            #For each site, calculate:
  summarize(
    total_mean_MTR= mean(mean_MTR) #Mean MTR
    )->total_mean_MTR

#-Add MTR to directions and wind
mean_dir_total <-merge(mean_dir_total, total_mean_MTR[, c("radar_id","total_mean_MTR")], by = "radar_id")

   

Plot total mean direction and mean MTR on map:

   

Plot mean directions per site and date on map

 
 

Mean dir per each night (black arrows, Note! now sized by MTR, not R). Red dots also sized by MTR, green arrows show wind direction sized by wind speed:

 

 
 
 

Weather effects


Calculate wind assitance

Tail wind component

We start with calculating an overall (system level) measure of tailwind component (TC) by using the overall mean direction at each site and the nightly mean wind direction. This will of course be a very blunt measure of wind assistance as it uses track rather than heading (does not take drift/comp into account) and further does not take into account nightly variation in preferred directions. Needs review?

Equation used:

\[TC = V_{wind} * \cos(\alpha _{wind}- \bar{\alpha}_{track})\]

Wind profit

We also calculate wind assistance in a slightly different way, “wind profit” (WP) sensu Erni et al 2002. We need to assume a mean speed (or should we use the site specific one?). Now uses 12 m/s….

Equation used:

\[WP = 12 -\sqrt{12^2 + V^2_{wind}-2V_{wind}*12*\cos(\alpha _{wind}- \bar{\alpha}_{track})}\]  
 

#Add total mean dir per site to MTR means (using MTR to have full dataset, not filtered by dens)
MTR_wind <-merge(flyway_agg_mtr, mean_dir_total[, c("radar_id","total_avg_dd")], by = "radar_id")
MTR_wind <-merge(MTR_wind, wind, by = c("radar_id","date_of_sunset"))

MTR_wind%>%
  mutate(country=(substr(radar_id,1,2)))%>%
  mutate(total_avg_dd = ifelse(total_avg_dd < 0, (total_avg_dd+360),
                               total_avg_dd)) %>%    #Change from -180 - 180, to: 0 - 360
  mutate(diff = abs(wind_dir_to-total_avg_dd))%>%    #Calc diff between mean dir and nightly wind dir
  mutate(diff = ifelse(diff > 180, (abs(diff-360)), 
                       diff))%>%                     #Ajust angels over 180
  mutate(tail_comp = wind.speed*cos(diff*pi/180))%>% #Calc TC (times pi/180 bc radians)
  mutate(wind_profit = 12-sqrt(12^2+wind.speed^2-2*wind.speed*12*cos(diff*pi/180))   #Calc WP (times pi/180 bc radians)
         )->MTR_WP

 
 
Plot mean nightly MTR over tailwind component:  
 

Plot of only positive tail-wind conditions over time, to compare to latitudinal wave. Size and color by tail wind component (only positive).

 
 
Plot mean nightly MTR over wind profit:  
 

Mixed model

In a mixed model, test the how tailwind component affects the mean MTR per site. Included in the model are: random effects: radar_id and country, variables: rain or not (rainYN), tailwind component (tail_comp) and the previous nights tail wind component (lagTC) and the interaction between tail_comp and lagTC. Rain is included to account for the fact that we know that on nights with rain there must per definition be less migration, and because we are also cutting out data when its raining. Rain “yes” is here defined as if 40% or more time stamps during a night are classified as “raining” according to the definition used above (5 altitude bins with DBZH >7). The response variable is log(mean_MTR) because mean MTR is not normally distributed, and the residuals are also skewed if mean MTR is not logged (I tried several different models, with logged data or not, and the results seem consistent). I tested that the model got better (lower AIC) when adding each variable.

#Create dataset with rainYN and tailwind comp of previous night
MTR_WP%>%
  mutate(rainYN = ifelse(percent_rain>40, "yes", "no"))%>%
  group_by(radar_id)%>%
  mutate(lagTC = lag(tail_comp))->c

#Linear mixed model (load lmerTest to get p-values)
library(lmerTest)
mtr_model1= lmer(log(mean_MTR+1) ~ tail_comp +rainYN +lagTC +tail_comp:lagTC +(1|radar_id) +(1|country), data=c)
summary(mtr_model1)
## Linear mixed model fit by REML t-tests use Satterthwaite approximations
##   to degrees of freedom [lmerMod]
## Formula: 
## log(mean_MTR + 1) ~ tail_comp + rainYN + lagTC + tail_comp:lagTC +  
##     (1 | radar_id) + (1 | country)
##    Data: c
## 
## REML criterion at convergence: 4873.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.1210 -0.4821  0.0906  0.6445  4.5007 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  radar_id (Intercept) 0.325    0.5701  
##  country  (Intercept) 1.085    1.0416  
##  Residual             2.088    1.4449  
## Number of obs: 1322, groups:  radar_id, 70; country, 11
## 
## Fixed effects:
##                   Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)      4.679e+00  3.340e-01  1.030e+01  14.009 4.77e-08 ***
## tail_comp        8.572e-02  8.629e-03  1.250e+03   9.934  < 2e-16 ***
## rainYNyes       -1.948e+00  1.584e-01  1.267e+03 -12.292  < 2e-16 ***
## lagTC           -1.424e-02  8.751e-03  1.250e+03  -1.627    0.104    
## tail_comp:lagTC -6.686e-03  9.192e-04  1.300e+03  -7.273 6.04e-13 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) tl_cmp rnYNys lagTC 
## tail_comp   -0.002                     
## rainYNyes   -0.030  0.033              
## lagTC       -0.001 -0.699  0.079       
## tl_cmp:lgTC -0.074 -0.036 -0.097 -0.052